﻿<UserControl 
    x:Class="TfsWorkbench.VersionCheck.Views.VersionCheckButton"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:ValueConverters="clr-namespace:TfsWorkbench.UIElements.ValueConverters;assembly=TfsWorkbench.UIElements"
    mc:Ignorable="d" 
    d:DesignHeight="25" d:DesignWidth="100"
    ToolTip="{Binding ButtonToolTip}"
    >
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/TfsWorkbench.UIElements;component/Resources/CommandButtonStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <ValueConverters:BoolToVisibilityConverter x:Key="VisibilityConverter" FalseVisibility="Collapsed" TrueVisibility="Visible" />
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Button 
            Style="{StaticResource QuestionButtonStyle}"
            Content="{Binding ButtonContentText}" 
            Command="{Binding VersionCheckCommand.Command}" 
            Visibility="{Binding Path=ShowButton, Converter={StaticResource VisibilityConverter}}"
            />
    </Grid>
</UserControl>
